home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Leonardo the Inventor
/
Leonardo The Inventor (93026)(Broderbund)(Riverdeep)(2004).iso
/
LEOWINMV
/
SHARED.DIR
/
03127_Script_PRINTOMATIC MDESCRIBE
< prev
next >
Wrap
Text File
|
1996-04-01
|
8KB
|
249 lines
-- -----------------------------------------------------------
-- printomatic(mdescribe)
--
-- STANDARD METHODS
--I mNew
--X mDispose
--
-- DOCUMENT ATTRIBUTES
--X mReset
--I mNewPage
--XI mSetPage, pageNum
--IIIII mSetMargins, left, top, right, bottom
--X mSetPrintableMargins
--I mGetPageWidth
--I mGetPageHeight
--I mGetPaperWidth
--I mGetPaperHeight
--
-- GRAPHICS STATE
--XIII mSetColor, r, g, b (scale = 0-255)
--XI mSetGray, grayLevel (scale = 0-100)
--XII mSetPenSize, h, v
--XS mSetTextFont, fontName
--XI mSetTextSize, fontSize
--XS mSetTextStyle, styleNames
--XS mSetTextJust, [ right | left | centered ]
--
-- TEXT ELEMENTS
--XIIIII mTextBox, left, top, right, bottom, linkedToPrevious
--V mSetText, textString [, autoAppend]
--V mAppendText, textString [, autoAppend]
--V mAppendTextFile, fileName [, autoAppend]
--V mAppendTextResource, id | name [, autoAppend]
--ISII mDrawText, text, startH, startV
--S mGetInsertionPoint
--
-- GRAPHIC ELEMENTS
--XIIII mStrokedRect, left, top, right, bottom
--XIIII mFilledRect, left, top, right, bottom
--XIIIII mStrokedRoundRect, left, top, right, bottom, cornerRadius
--XIIIII mFilledRoundRect, left, top, right, bottom, cornerRadius
--V mStrokedOval [, left, top, right, bottom | , centerH, centerV, radius ]
--V mFilledOval [, left, top, right, bottom | , centerH, centerV, radius ]
--XIIII mLine, startH, startV, endH, endV
--V mPicture, pict | pictFile | pictResID, left, top [ , right, bottom ]
--V mStagePicture, left, top , right, bottom [,clipLeft ,clipTop ...]
--V m1BitStagePicture, left, top , right, bottom [,clipLeft ,clipTop ...]
--V mEPSFile, fileName, left, top , right, bottom
--
-- PRINTING
--II mSetLandscapeMode, trueOrFalse
--XS mSetDocumentName, name
--I mDoPageSetup
--I mDoJobSetup
--XS mSetProgressMsg, text
--V mSetProgressPict, pict
--XII mSetProgressLoc, left, top
--I mPrintPreview
--V mPrintPicts [, folder]
--X mPrint
--
-- SAVING TO DISK
--ISISS mSavePageSetup, fileName, resID, fileType, fileCreator
--ISI mGetPageSetup, fileName, resID
--
-- MISCELLANEOUS
--XI mHideMessages, trueOrFalse
--IS mSetPageNumSymbol, symbol
--IS mRegister, serialNumber
--
-- the following are the print text handlers of the printomatic example movie
--on mouseUp
-- global printer
--
-- if not objectP(printer) then
-- Alert "There is no currently selected printer. Printing features are disabled."
-- else
-- cursor 4 --because this much styled text takes a while to compile...
--
-- printer (mReset)
-- printer (mSetMargins,72,60,72,48)
--
-- put printer(mGetPageWidth) into w
-- put printer(mGetPageheight) into h
--
-- printer (mSetPageNumSymbol,"▐")
--
-- printer (mSetTextFont,"helvetica")
-- printer (mSetTextSize,10)
-- printer (mSetTextStyle,"normal,italic")
--
-- --page header left side
-- printer (mSetTextJust,"left")
-- printer (mDrawText,"PrintOMatic XObject Documentation",0,8)
--
-- --page header right side
-- printer (mSetTextJust,"right")
-- printer (mDrawText,"printed"&&the date,w,8)
--
-- --page header line underneath
-- printer (mLine,0,11,w,11)
--
-- --page footer right side
-- printer (mDrawText,"page ▐",w,h-2)
--
-- --the body pages
-- printer (mSetTextJust,"left")
--
-- --page 1
--
-- --block out the header with a white rectangle
-- printer (mNewPage)
-- printer (mSetGray,0)
-- printer (mFilledRect,0,0,w+5,12)
--
-- --place the picture
-- if the machineType = 256 then
-- printer (mSetGray,50)
-- printer (mFilledRect,0,60,w/2,220)
-- else
-- printer (mPicture,the picture of cast "illustration" 0,60,w/2,220)
-- end if
-- printer (mSetGray,100)
--
-- --wrap the text around the picture
-- printer (mTextBox,0,0,w,50,false)
-- printer (mTextBox,0,240,w,h-40,true)
--
-- --page 2
-- printer (mNewPage)
-- printer (mTextBox,0,30,w,h-24,true)
-- --page 3
-- printer (mNewPage)
-- printer (mTextBox,0,30,w,h-24,true)
-- --page 4
-- printer (mNewPage)
-- printer (mTextBox,0,30,w,h-24,true)
-- --page 5
-- printer (mNewPage)
-- printer (mTextBox,0,30,w,h-24,true)
-- --page 6
-- printer (mNewPage)
-- printer (mTextBox,0,30,w,h-24,true)
-- --page 7
-- printer (mNewPage)
-- printer (mTextBox,0,30,w,h-24,true)
-- --page 8
-- printer (mNewPage)
-- printer (mTextBox,0,30,w,h-24,true)
-- --page 9
-- printer (mNewPage)
-- printer (mTextBox,0,30,w,h-24,true)
-- --page 10
-- printer (mNewPage)
-- printer (mTextBox,0,30,w,h-24,true)
--
-- --flow the body text
--
-- AppendTitleText (the text of cast "docTitle")
-- put the number of cast "docTitle" + 1 into curCast
--
-- repeat while the castType of cast curCast = #text
-- if the name of cast curCast = "section" then
-- AppendSectionText(the text of cast curCast)
-- else if the name of cast curCast = "methodList" then
-- AppendMethodListText(the text of cast curCast)
-- else if the name of cast curCast = "method" then
-- AppendMethodText(the text of cast curCast)
-- else if the name of cast curCast = "note" then
-- AppendNoteText(the text of cast curCast)
-- else
-- AppendText(the text of cast curCast)
-- end if
-- put curCast + 1 into curCast
-- end repeat
--
-- if word 1 of the text of cast (the castnum of sprite (the clickOn)) = "Preview" then
-- printer (mPrintPreview)
-- else
-- if printer(mDoJobSetup) = true then
-- updatestage
-- printer (mPrint)
-- end if
-- end if
--
-- cursor -1
--
-- end if
--
--end mouseUp
--
--
--on AppendTitleText txt
-- global printer,gPropFont
-- printer (mSetTextFont,gPropFont)
-- printer (mSetTextStyle,"bold")
-- printer (mSetTextSize,14)
-- printer (mAppendText,line 1 of txt&return)
-- printer (mSetTextStyle,"normal")
-- printer (mSetTextSize,10)
-- printer (mAppendText,line 2 to (the number of lines in txt) of txt)
--end
--
--on AppendSectionText txt
-- global printer,gPropFont
-- printer (mSetTextFont,gPropFont)
-- printer (mSetTextStyle,"bold")
-- printer (mSetTextSize,12)
-- printer (mAppendText,line 1 of txt&return)
-- printer (mSetTextStyle,"normal")
-- printer (mSetTextSize,10)
-- printer (mAppendText,line 2 to (the number of lines in txt) of txt)
--end
--
--on AppendMethodListText txt
-- global printer,gMonoFont
-- printer (mSetTextFont,gMonoFont)
-- printer (mSetTextStyle,"normal")
-- printer (mSetTextSize,9)
-- printer (mAppendText,txt)
--end
--
--on AppendMethodText txt
-- global printer,gPropFont
-- printer (mSetTextFont,gPropFont)
-- printer (mSetTextStyle,"bold")
-- printer (mSetTextSize,10)
-- printer (mAppendText,word 1 of txt&" ")
-- printer (mSetTextStyle,"normal")
-- printer (mAppendText,word 2 to (the number of words in txt) of txt & return & return)
--end
--
--on AppendNoteText txt
-- global printer,gPropFont
-- printer (mSetTextFont,gPropFont)
-- printer (mSetTextStyle,"italic")
-- printer (mSetTextSize,10)
-- printer (mAppendText,txt)
--end
--
--on AppendText txt
-- global printer,gPropFont
-- printer (mSetColor,255,0,0);
-- printer (mSetTextFont,gPropFont)
-- printer (mSetTextStyle,"normal")
-- printer (mSetTextSize,10)
-- printer (mAppendText,txt)
-- printer (mSetGray,100)
--end